package com.xmy.cultivate.feign.english;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.xmy.cultivate.entity.SchoolQuarter;
import com.xmy.cultivate.entity.request.AiSitePc;
import com.xmy.cultivate.entity.views.AiSitePcLoginRs;
import com.xmy.cultivate.entity.views.EduTask;
import com.xmy.cultivate.entity.views.PassRade;
import com.xmy.cultivate.respons.AiSchoolSite;
import com.xmy.cultivate.respons.PlanShutNum;
import com.xmy.cultivate.respons.ResStudentAccount;
import com.xmy.cultivate.respons.ResStudentClassType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(value = "study-outside")
public interface IFeiEnglishFeignClient {

    /**
     *
     * @param
     * @return
     */
    @GetMapping("/api/outside/studentAccount/test")
    //@RequestMapping(value="/api/outside/studentAccount/test",method=RequestMethod.GET)
    public String test123(@RequestParam("name") String name);


    //@RequestMapping(value="/api/outside/studentAccount/addAccount",method=RequestMethod.POST)
    @PostMapping("/api/outside/studentAccount/addAccount")
    public Boolean addAccount(@RequestBody ResStudentAccount resStudentAccount);

    /**
    @PostMapping("/api/outside/studentAccount/updateClassType")
    public Boolean updateClassType(@RequestBody ResStudentClassType studentClassType);
     */

    @PostMapping("/api/outside/studentAccount/updateClassType")
    public boolean updateStudentClassType(@RequestBody ResStudentClassType studentClassType);


    /**
     * 新学期，更新学生班型
     * @param studentClassType
     * @return
     */
    @PostMapping("/api/outside/studentAccount/newQuarterUpdateClassType")
    public boolean newQuarterUpdateClassType(@RequestBody ResStudentClassType studentClassType);

    /**
     * yearPart
     *quarterNum
     *studentId
     *yearClassId
     * lessonNum
     * @param map
     * @return
     * 总关数：allShutNum，应通关数：showPassShutNum，课次应通关数：lowestShutNum，课次超级目标：breakShutNum，课次已通关数：maxPassShutNum
     */
    @PostMapping(value = "/api/outside/chaPlan/getPassNumForLessonNum")
    public Map<String,Object> getPassNumForLessonNum(@RequestBody Map<String,Object> map);

    /**
     * 获取所属班型
     * @param studentId
     * @param isVacation
     * @return
     */
    @GetMapping("/api/outside/perStudent/getStudentClassType")
    public Map<String,String> getStudentClassType(@RequestParam(value = "studentId",required = false) Long studentId,@RequestParam(value = "isVacation",required = false) Integer isVacation,@RequestParam(value = "yearPart",required = false)Integer yearPart,@RequestParam(value = "quarterNum",required = false)Integer quarterNum);

    @RequestMapping(value = "/api/outside/chaPlan/getMinimumTaskProgressRateEqualNew",method= RequestMethod.POST)
    public List<PassRade> getMinimumTaskProgressRateEqualNew(@RequestBody PlanShutNum planShutNum);

    //任务表 学习到的课次 最大一条
    @RequestMapping(value = "/api/outside/eduTask/getTaskNumberMax",method= RequestMethod.POST)
    public EduTask getTaskNumberMax(@RequestBody EduTask eduTask);

    /**
     * 获取校区场地
     */
    @RequestMapping(value = "/api/outside/aiSchoolSite", method = RequestMethod.GET)
    public List<SchoolQuarter> aiSchoolSiteList(@RequestParam(value = "yearPart") String yearPart,
                                               @RequestParam(value = "quarterNum") String quarterNum,
                                               @RequestParam(value = "schoolId") String schoolId);

    @GetMapping("/api/outside/aiSitePc/getSitePcForStudent")
    public AiSitePcLoginRs getSitePcForStudent(@RequestParam("studentId") Long studentId,
                                               @RequestParam(value = "markCode",required = false) String markCode
    );

}
